const express = require('express');
const router = express.Router();
const adminController = require('../controllers/adminController');
const { authenticate } = require('../middleware/authMiddleware');

// 添加路由日志中间件
router.use((req, res, next) => {
  next();
});

// 登录接口
router.post('/login', adminController.login);

// 登出接口
router.post('/logout', authenticate, adminController.logout);

// 获取管理员信息
router.get('/info', authenticate, adminController.getAdminInfo);

module.exports = router; 